﻿Public Class TraCuuXeControl
    Sub New()
        Me.Dock = DockStyle.Fill
        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.
        gpThongTinTraCuu.Visible = False
        dgvTraCuu.Visible = False
    End Sub

  

    Private Sub btnTraCuu_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTraCuu.Click
        gpThongTinTraCuu.Visible = True
        dgvTraCuu.Visible = True
    End Sub

    Private Sub rdbBienSo_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rdbBienSo.CheckedChanged
        If (rdbBienSo.Checked = True) Then
            txtTimBienSo.Enabled = True
            cbbTimHieuXe.Enabled = False
            txtTimTenKhachHang.Enabled = False
            dtpTimNgayTiepNhan.Enabled = False
        End If
    End Sub

    Private Sub rdbHieuXe_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rdbHieuXe.CheckedChanged
        If (rdbHieuXe.Checked = True) Then
            cbbTimHieuXe.Enabled = True
            txtTimBienSo.Enabled = False
            txtTimTenKhachHang.Enabled = False
            dtpTimNgayTiepNhan.Enabled = False
        End If
    End Sub

    Private Sub rdbTenKhachHang_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rdbTenKhachHang.CheckedChanged
        If (rdbTenKhachHang.Checked = True) Then
            txtTimTenKhachHang.Enabled = True
            txtTimBienSo.Enabled = False
            cbbTimHieuXe.Enabled = False
            dtpTimNgayTiepNhan.Enabled = False
        End If
    End Sub

    Private Sub rdbNgayTiepNhan_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rdbNgayTiepNhan.CheckedChanged
        If (rdbNgayTiepNhan.Checked = True) Then
            dtpTimNgayTiepNhan.Enabled = True
            txtTimBienSo.Enabled = False
            txtTimTenKhachHang.Enabled = False
            cbbTimHieuXe.Enabled = False
        End If
    End Sub
End Class
